<?php   
    require('./Utils.php');

    $conn = getConnection();

    $stmt = $conn->prepare("SELECT username, password FROM administrator");

    $stmt->execute();

    $stmt->bind_result($username, $password);

    $array = array();

    while($stmt->fetch()){
        $admin['username'] = $username;
        $admin['password'] = $password;

        array_push($array, $admin);
    }

    $result = json_encode($array);

    echo $result;
?>